home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / TEST / ARGS.ASM < prev    next >
Assembly Source File  |  1997-03-24  |  540b  |  32 lines

  1. include qlib.inc
  2. include string.inc
  3. include stdio.inc
  4. include conio.inc
  5.  
  6. .code
  7. main proc,argc:dword,argv:dword
  8.   mov ecx,argc
  9.   callp printf,"# args=%d\n",ecx
  10.   test ecx,ecx
  11.   jz done
  12.   mov ebx,1
  13. @@:
  14.   mov edx,ebx
  15.   dec edx
  16.   shl edx,2 ;*4
  17.   mov eax,argv  ;FIX : v2.00 Beta #5 : this was add (lucky eax was always 0 after the printf calls)
  18.   mov edx,[eax+edx]
  19.   callp printf," Arg #%d=%s \n",ebx,edx
  20.   inc ebx
  21.   dec ecx
  22.   jnz @b
  23. done:
  24.   callp print,"done (slam a key)\n\n"
  25.   call getch
  26.   ret
  27. main endp
  28.  
  29. end
  30.  
  31.  
  32.